package communication;

public class ProducerCustomerTest {
    public static void main(String[] args) {
        Clerk clerk = new Clerk();
        Producer producer = new Producer(clerk);
        Customer customer = new Customer(clerk);

        Thread clk = new Thread(clerk, "员工");
        clk.setPriority(5);
//        clk.start();
        Thread prd = new Thread(producer, "生产者");
        prd.setPriority(Thread.MAX_PRIORITY);
        prd.start();
        Thread csm = new Thread(customer, "消费者");
        csm.setPriority(Thread.MIN_PRIORITY);
        csm.start();

    }
}
